# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=rankwidth
pkgver=0.9
pkgrel=3
pkgdesc="Library for calculating rank-width and rank-decompositions"
url="https://sourceforge.net/projects/rankwidth/"
# s390x: blocked by libigraph
arch="all !s390x"
license="GPL-2.0-or-later"
makedepends="libigraph-dev"
options="!check" # no test suite
source="https://master.dl.sourceforge.net/project/rankwidth/rw-$pkgver.tar.gz
	igraph-0.10.1.patch"
subpackages="$pkgname-static $pkgname-dev $pkgname-libs $pkgname-doc"
builddir="$srcdir/rw-$pkgver"

build() {
	export CFLAGS="${CFLAGS/-Os/-O3}" # gotta go fast

	./configure \
		--target="$CTARGET" \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
f4f1910506cbdb557ca50bac6f63cfca3271a5df8d13c67d2d9bba79b9cdb03196a679e6091554175decbee0871888de71bed5746662c9a75418f0f5dd9bd609  rw-0.9.tar.gz
94871294bf2ffc2733cf14c241773bb339d5aab1e6f5b2801c8406df367045fbcb3c5fb9787f0bbf6c4fefc1c40aca93736f1df4520e30c00f24294209c2811f  igraph-0.10.1.patch
"
